package com.crm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.crm.entity.Modules;
import com.crm.entity.ModulesTreeNode;
import com.crm.mapper.ModulesMapper;
import com.crm.service.ModulesService;

@Service
public class ModulesServiceImpl implements ModulesService {
	
	@Autowired
	private ModulesMapper modulesMapper;

	@Override
	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return modulesMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Modules record) {
		// TODO Auto-generated method stub
		return modulesMapper.insert(record);
	}

	@Override
	public Modules selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return modulesMapper.selectByPrimaryKey(id);
	}

	@Override
	public List<Modules> selectListAll() {
		// TODO Auto-generated method stub
		return modulesMapper.selectListAll();
	}

	@Override
	public int update(Modules record) {
		// TODO Auto-generated method stub
		return modulesMapper.update(record);
	}

	@Override
	public List<ModulesTreeNode> selectAll(String rolesIds) {
		// TODO Auto-generated method stub
		return modulesMapper.selectAll(rolesIds);
	}

	@Override
	public List<ModulesTreeNode> selectAllModulesTree() {
		// TODO Auto-generated method stub
		return modulesMapper.selectAllModulesTree();
	}

	@Override
	public List<Modules> selectRoleIdListAll(String rolesIds) {
		// TODO Auto-generated method stub
		return modulesMapper.selectRoleIdListAll(rolesIds);
	}

	@Override
	public List<ModulesTreeNode> selectAllTree(String rolesIds) {
		// TODO Auto-generated method stub
		return modulesMapper.selectAllTree(rolesIds);
	}
}
